<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <h4 class="modal-title">导入总系统平台粉丝用户数据</h4>
        </div>
        <div class="modal-body">
            <div class="progress">
                <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
            </div>
            <div class="modal-tip">
                系统正在为您导入粉丝用户数据，请耐心等待~~~
            </div>
        </div>
    </div>
</div>
<script language='javascript'>
    var sync = function(pindex) {
        $.post("{php echo web_url('member/wlMember/memberImport');}", {page:pindex},function (result) {
            if(result.data.pindex < result.data.total){
                var pragress = result.data.pindex/result.data.total*100;
                $('.progress-bar').css('width', pragress + '%');
                $('.progress-bar').html(pragress.toFixed(2) + '%');
                ++pindex;
                sync(pindex);
            } else {
                tip.alert('导入粉丝用户数据成功！', function () {
                    location.href = "{php echo web_url('member/wlMember/memberIndex');}";
                });
            }
        },'json');
    };
    sync(1);
</script>